package com.xc.mail.service.impl;

import com.xc.mail.mapper.EmployeeMapper;
import com.xc.mail.pojo.Employee;
import com.xc.mail.service.EmployeeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author admin
 * @version 1.0.0
 * @ClassName EmployeeServiceImpl.java
 * @Description TODO
 * @createTime 2021年04月23日 16:00:00
 */
@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Resource
    private EmployeeMapper employeeMapper;

    @Override
    public Employee getEmpById(Integer id) {
        return employeeMapper.getEmpById(id);
    }

    @Override
    public int updateEmp(Employee employee) {
         return employeeMapper.updateEmp(employee);
    }

    @Override
    public int addEmp(Employee employee) {
      return employeeMapper.addEmp(employee);
    }

    @Override
    public void delEmp(Integer id) {
        employeeMapper.delEmp(id);
    }

    @Override
    public Employee getEmp(Integer id, String gender) {
        return employeeMapper.getEmp(id,gender);
    }
}
